package vip.sweet.sys.modular.role.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import vip.sweet.sys.modular.resources.entity.Resources;
import vip.sweet.sys.modular.role.entity.Role;

import java.util.List;


/**
 * @author tianlianyin
 * @date 2024/11/11
 */
public interface RoleMapper extends BaseMapper<Role> {
    List<Resources> getAllResourcesByRoleId(@Param("roleId") String roleId);
    void clearResourceByRoleId(@Param("roleId") String roleId);

    boolean grantResource(@Param("roleId") String roleId, @Param("resourcesIds") List<String> resourcesIds);
}
